const express = require('express')
      router = express.Router()
      
  router.post('/ask',signIn,(req,res) =>{
  	req.body.username = req.cookies.username
  	req.body.ownerId = req.cookies.ownerId
  	req.body.createTime = new Date()
  	var question = new Question(req.body)
  	question.save(function(err,data){
  		 if(err){
  		 	send(res,'fail','很抱歉系统错误')
  		 }else{
       	send(res,'success','提问成功')  
  		 }
  	})
  })
   
  
   


module.exports = router